package dashboard

Import Path
	github.com/K-Phoen/grabana/dashboard (on go.dev)

Dependency Relation
	imports 12 packages, and imported by 2 packages

Involved Source Files dashboard.go link.go
Package-Level Type Names (total 7)
/* sort by: | */
Builder is the main builder used to configure dashboards. Alerts returns all the alerts defined in this dashboard. Internal. MarshalIndentJSON renders the dashboard as indented JSON which your configuration management tool of choice can then feed into Grafana's dashboard via its provisioning support. See https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards MarshalJSON implements the encoding/json.Marshaler interface. This method can be used to render the dashboard as JSON which your configuration management tool of choice can then feed into Grafana's dashboard via its provisioning support. See https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards *Builder : github.com/goccy/go-json.Marshaler *Builder : encoding/json.Marshaler func New(title string, options ...Option) (Builder, error) func github.com/pancsta/asyncmachine-go/tools/generator.GenDashboard(p cli.GrafanaParams) (*Builder, error) func github.com/K-Phoen/grabana.(*Client).UpsertDashboard(ctx context.Context, folder *grabana.Folder, builder Builder) (*grabana.Dashboard, error) func github.com/pancsta/asyncmachine-go/tools/generator.SyncDashboard(ctx context.Context, p cli.GrafanaParams, builder *Builder) error
const IconBolt const IconCloud const IconDashboard const IconDoc const IconExternal const IconInfo const IconQuestion
Option represents an option that can be used to configure a dashboard. func AutoRefresh(interval string) Option func DashboardLinks(links ...DashboardLink) Option func DefaultTooltip() Option func Editable() Option func ExternalLinks(links ...ExternalLink) Option func ID(id uint) Option func ReadOnly() Option func Row(title string, options ...row.Option) Option func SharedCrossHair() Option func Slug(slug string) Option func Tags(tags []string) Option func TagsAnnotation(annotation TagAnnotation) Option func Time(from, to string) Option func Timezone(timezone TimezoneOption) Option func UID(uid string) Option func VariableAsConst(name string, options ...constant.Option) Option func VariableAsCustom(name string, options ...custom.Option) Option func VariableAsDatasource(name string, options ...datasource.Option) Option func VariableAsInterval(name string, options ...interval.Option) Option func VariableAsQuery(name string, options ...query.Option) Option func VariableAsText(name string, options ...text.Option) Option func New(title string, options ...Option) (Builder, error)
TagAnnotation describes an annotation represented as a Tag. See https://grafana.com/docs/grafana/latest/reference/annotations/#query-by-tag Datasource string IconColor string Name string Tags []string func TagsAnnotation(annotation TagAnnotation) Option
TimezoneOption represents a possible value for the dashboard's timezone configuration. func Timezone(timezone TimezoneOption) Option const Browser const DefaultTimezone const UTC
Package-Level Functions (total 22)
AutoRefresh defines the auto-refresh interval for the dashboard.
DefaultTooltip configures the graph tooltip NOT to be shared across panels.
Editable marks the dashboard as editable.
ID sets the ID used by the dashboard.
New creates a new dashboard builder.
ReadOnly marks the dashboard as non-editable.
Row adds a row to the dashboard.
SharedCrossHair configures the graph tooltip to be shared across panels.
Slug sets the Slug used by the dashboard.
Tags adds the given set of tags to the dashboard.
TagsAnnotation adds a new source of annotation for the dashboard.
Time defines the default time range for the dashboard, e.g. from "now-6h" to "now".
Timezone defines the default timezone for the dashboard, e.g. "utc".
UID sets the UID used by the dashboard.
VariableAsConst adds a templated variable, defined as a set of constant values. See https://grafana.com/docs/grafana/latest/reference/templating/#variable-types
VariableAsCustom adds a templated variable, defined as a set of custom values. See https://grafana.com/docs/grafana/latest/reference/templating/#variable-types
VariableAsDatasource adds a templated variable, defined as a datasource. See https://grafana.com/docs/grafana/latest/variables/variable-types/add-data-source-variable/
VariableAsInterval adds a templated variable, defined as an interval. See https://grafana.com/docs/grafana/latest/reference/templating/#variable-types
VariableAsQuery adds a templated variable, defined as a query. See https://grafana.com/docs/grafana/latest/reference/templating/#variable-types
VariableAsText adds a templated variable, defined as a free text input. See https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/#add-a-text-box-variable
Package-Level Constants (total 10)
Browser sets the dashboard's timezone to the browser's one.
DefaultTimezone sets the dashboard's timezone to the default one used by Grafana.
const IconBolt LinkIcon = "bolt"
const IconCloud LinkIcon = "cloud"
const IconDashboard LinkIcon = "dashboard"
const IconDoc LinkIcon = "doc"
const IconExternal LinkIcon = "external"
const IconInfo LinkIcon = "info"
const IconQuestion LinkIcon = "question"
UTC sets the dashboard's timezone to UTC.